<?php
class authentication
{
    public $login;
    public $pass;

    function authentication($login, $pass){
        
        $this->login    =   $login;
        $this->pass     =   md5($pass);        
    }
    
    function check(){
       $res=mysql_num_rows(mysql_query("SELECT `id` FROM `users` WHERE `username` = '$this->login' AND `password` = '$this->pass';"));
       if ($res>0) {
          return true;
       }
       return false;        
        
    }
}

?>